package com.gome.oa.custom;

import java.awt.Dimension;
import java.awt.LayoutManager;

import javax.swing.JPanel;

/**
*
* @author: tang li
* @date: 2016年8月13日
* @desc: 
*
*/
public class JPanelWithHeight extends JPanel {
	
	private static final long serialVersionUID = 1370735107104669429L;
	
	private int height;

	public JPanelWithHeight(int height) {
		this.height = height;
	}
	
	public JPanelWithHeight(int height, LayoutManager layoutManager) {
		this.height = height;
		this.setLayout(layoutManager);
	}

	@Override
    public Dimension getMaximumSize() {
        return new Dimension(super.getMaximumSize().width, height);
    }

}
